package com.personal.kousuan.random;

import java.util.Random;

import com.personal.kousuan.util.RandomUtil;

/**
 * 创建一个随机数，使其比Seed要大
 */
public class JieWeiRandomGenerator implements RandomGenerator {

	/**
	 * 创建一个随机数，使其比Seed要大
	 */
	@Override
	public int generateRandom(int seed) {
		//创建0-9之间的随机数
		return RandomUtil.generateRandom(seed, 9);
	}

	/**
	 * 创建一个随机数，使其比Seed要大，但要小于max
	 */
	@Override
	public int generateRandom(int seed, int max) {
/*		//取得Seed的个位
		int seedGeWei = seed % 10;
		
		int gewei = RandomUtil.generateRandom(seedGeWei + 1, 9);
				
		int shiweiBase = seed / 10;
		
		int shiwei = RandomUtil.generateRandom(0, shiweiBase - 1);
		
		
		return shiwei * 10 + gewei;
*/
	
		return RandomUtil.generateRandom(seed, max);
	}

}
